<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php
			global $page, $paged;
			wp_title( '|', true, 'right' );
			bloginfo( 'name' );
			$site_description = get_bloginfo( 'description', 'display' );
			if ( $site_description && ( is_home() || is_front_page() ) )
				echo " | $site_description";
			if ( $paged >= 2 || $page >= 2 )
				echo ' | 第' . max( $paged, $page ) . '页';
			?></title>
<meta name="keywords" content="<?php echo get_option('T_keywords'); ?>" />
<meta name="description" content="<?php echo get_option('T_description'); ?>" />
<link rel="shorcut icon" href="<?php bloginfo('template_url'); ?>/images/favicon.ico" type="image/x-ico" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo( 'stylesheet_url' ); ?>" title="style" />
<?php
	$s = get_option("T_style");
	$str = explode("|" , $s);
	if ($s){
		echo '<link rel="alternate stylesheet" type="text/css" media="screen" href="' . get_bloginfo('template_url') . '/' . $str[1] . '.css" title="'. $str[1] .'" />';
		echo '<script type="text/javascript">var nowStyle = readCookie("wwmm_style");var jSnow;if (nowStyle){switchStylestyle(nowStyle);}else{nowStyle = "style";}</script>';
	}
?>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0 - 所有文章" href="<?php echo get_bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0 - 所有评论" href="<?php bloginfo('comments_rss2_url'); ?>" />
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.atooltip.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.lazyload.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.scrolltotop.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.colorbox.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.web.js"></script>
<?php if ( is_home() ) : ?>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.slides.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.timeago.js"></script>
<?php endif; ?>
<?php if ( is_singular() && get_option( 'thread_comments' ) ) : ?>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/comments-ajax.js"></script>
<?php endif; ?>
<?php wp_head(); ?>
<script type="text/javascript" src="http://cbjs.baidu.com/js/m.js"></script>
<script type="text/javascript">BAIDU_CLB_preloadSlots("405488","404660","290520","262166","262161","255175","249921","230759","450086");</script>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21363237-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<?php flush(); ?>
</head>
<body>

<?php if ( current_user_can('contributor') || current_user_can('subscriber') || !is_user_logged_in() ):?>
<div class="top-bar">
	<div class="inner-top-bar">
		<div class="user-panel">
<?php global $user_ID, $user_identity, $user_level ?>
<?php if ( $user_ID ) : ?>
			hi，<a href="<?php bloginfo('url') ?>/wp-admin/profile.php"><?php echo $user_identity ?></a>！<a href="<?php echo wp_logout_url( home_url() ); ?>">退出</a><?php if ( $user_level >= 1 ) : ?>&nbsp;&nbsp;&nbsp;<a href="<?php bloginfo('url') ?>/wp-admin/post-new.php" class="submission">投稿</a> | <a href="http://wwmm.me/contribute" target="_blank">投稿指南</a>
			<?php endif; ?><?php wp_meta(); ?>
<?php elseif ( get_option('users_can_register') ) : ?>
			欢迎来<?php bloginfo("name");?>，<a href="<?php echo wp_login_url( home_url() ); ?>">请登录</a> <a href="/wp-login.php?action=register">免费注册</a>
<?php endif ?>
		</div>
		<div class="feed">+<a href="http://feed.wwmm.me/" target="_blank">订阅与关注<?php bloginfo("name");?></a></div>
	</div>
</div>
<?php endif;?>
<div class="header">
	<div class="inner-header">
		<h1><a href="<?php echo get_option('home'); ?>/" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
		<div class="say"><span>阿缘 说:</span>敞开心胸，放飞心情，品味意境之美！</div>
<?php
	$s = get_option("T_style");
	$str = explode("|" , $s);
	if ($s){
		echo '<div id="StyleSwitch"><div class="switch-bg"></div><a href="javascript:void(0);" rel="' . $str[1]  .'" class="switch-btn" title="切换到' . $str[0]  .'版">切换到' . $str[0]  .'版</a><a href="javascript:void(0);" rel="style" class="switch-btn" title="切换到经典版">切换到经典版</a></div>';
	}
?>
		<div id="HeaderSpread" class="spread"><script type="text/javascript">BAIDU_CLB_fillSlot("230759");</script></div>
	</div>
</div>
<div class="nav">
	<div class="menu">
<?php
	wp_nav_menu(array(
		'menu'            => 'Header Menu',
		'container'       => FALSE,
		'items_wrap'      => '<ul>%3$s</ul>'
	));
?>
		<div class="log"><a href="http://o.wwmm.me/" target="_blank">访问怀旧版唯美意境网</a></div>
	</div>
</div>
